package cn.hyf.control;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class FileService
{
	public static void saveFile(String filePath,String content) throws IOException{
		File file = new File(filePath);
		File dir = file.getParentFile();
		if(!dir.exists()){
			dir.mkdirs();
			file = new File(filePath);
		}
		FileWriter fw = new FileWriter(file);
		fw.write(content);
		fw.flush();
		fw.close();
	}
}
